//
//  Device.h
//  ZhiXingStore
//
//  Created by KFJ on 2019/3/11.
//  Copyright © 2019 QiaoLiKeJi. All rights reserved.
//

#ifndef Device_h
#define Device_h

#define AK_Developer  1

#if AK_Developer

#define SLog(xx, ...)   NSLog(xx, ##__VA_ARGS__)

#else

#define SLog(xx, ...)   ((void)0)
#define NSLog(FORMAT, ...) nil

#endif
//  全局视图内边距
#define kk_view_margin 12.0
// ----------  屏幕size
#define ScreenSize  ([[UIScreen mainScreen] bounds].size)
#define ScreenScale ([[UIScreen mainScreen] scale])
#define ScreenBounds [UIScreen mainScreen].bounds

#define ScreenWidth ScreenSize.width
#define ScreenHeight ScreenSize.height

#define IS_iPHONEX  \
({BOOL isPhoneX = NO;\
if (@available(iOS 11.0, *)) {\
isPhoneX = [[UIApplication sharedApplication] delegate].window.safeAreaInsets.bottom > 0.0;\
}\
(isPhoneX);})

#define NavigationBarHeight         ((IS_iPHONEX) ? 88 : 64)
#define NaviBarItemHeight           NavigationBarHeight - StatusBarHeight
#define TabbarHeight                ((IS_iPHONEX) ? 83 : 49)
#define StatusBarHeight             ((IS_iPHONEX) ? 44 : 20)
#define KSafeAreaBottom             ((IS_iPHONEX) ? 34 : 0)

#define IS_IPHONE_5 ( fabs( ( double )[ [ UIScreen mainScreen ] bounds ].size.height - ( double )568 ) < DBL_EPSILON )

#define IS_IPHONE_6 ( fabs( ( double )[ [ UIScreen mainScreen ] bounds ].size.width - ( double )375 ) < DBL_EPSILON )

#define IS_IPHONE_6Plus ( fabs( ( double )[ [ UIScreen mainScreen ] bounds ].size.width - ( double )414 ) < DBL_EPSILON )


#define global_viewBackgroundColor UIColor.whiteColor
#define global_view_LineColor UIColor.k_hexColor(0xF5F5F5)
#define global_view_darkLineColor UIColor.k_hexColor(0xe0e0e0)

#define kAppDelegate ((AppDelegate *)[[UIApplication sharedApplication]delegate])
#define kWindow [UIApplication sharedApplication].keyWindow


#define LBXScan_Define_Native 1 //下载了native模块
#define LBXScan_Define_UI 1    //下载了界面模块

#endif /* Device_h */
